#include "SpinBoxItem.h"

SpinBoxItem::SpinBoxItem(QTreeWidgetItem *item, int column)
{
    this->item = item;
    this->column = column;
    connect(this, SIGNAL(editingFinished()), SLOT(changeItem()));
}

void SpinBoxItem::changeItem()
{
	if(this->value() >=0)
    {
		item->setData(this->column, Qt::UserRole, QString::number(this->value()));
        //qDebug() item->data(this->column, Qt::UserRole).toString();
    }
}